<?php
    // Create order table

    $DB = mysqli_connect('ppt_mysql', 'root', 'root', 'ppt');
    try {
        $sql = "create table if not exists  orders (
            id VARCHAR(255),
            userId int,
            productId int,
            ppt_status int,
            created VARCHAR(255),
            updated VARCHAR(255),
            token VARCHAR(255),
            FOREIGN KEY (userId) REFERENCES ppt.users (id),
            FOREIGN KEY (productId) REFERENCES ppt.product (id)
        );";
        $DB->query($sql);
    } catch (Exception $exception) {
        echo $exception;
    }
    $DB->close();
    unset($DB);
